import React, { Component } from 'react'
import Header from '../../components/Header'
// import RoutingHeader from '../routing-header/RoutingHeader'
import Housing1 from './home-rentlist/Housing1'
import styles from './Rentlist.module.scss'
import Features from './home-rentlist/Features'
import Roomname from "./home-rentlist/Roomname"
import { withRouter } from "react-router-dom";


//  import Index from './index'
// import Index from '../routing/Index'

class Rentlist extends Component {
    
    state = {
        activeTab: "overall",
        tabs: [
            {
                text:"智能锁",
                key:"lock"
            },
            {
                text:"带卫生间",
                key:"health"
            },
            {
                text:"有阳台",
                key:"balcony"
            },
            {
                text:"能养宠物",
                key:"pet"
            }
        ]
    }

    handleChange = (activeTab) => {
        this.setState({
            activeTab
        });
      };

    handleClick = () => {
        window.history.go(-1);
    }

    render() {
        return (
            <div className={styles.rentlist}>
                 <div className={styles.return} onClick={this.handleClick}>{"<"}</div>
                 <Header title="爱家租房"></Header>
                 {/* <RoutingHeader title="爱家租房"></RoutingHeader> */}
                 <div className={styles.advertising}></div>
                 <Housing1></Housing1>
                 <Features tabs={this.state.tabs}
                  handleChange={this.handleChange}
                 ></Features>
                <div className={styles.cover}>
                    <Roomname></Roomname>
                </div>
            </div>
        )
    }
}

export default withRouter(Rentlist)